<template>
	<button :class="['mx-book-btn', type]" @tap="onTap">{{text[type]}}</button>
</template>

<script>
	export default {
		name:"MxBookBtn",
		props: {
			// 按钮类型：default, free, booked
			type: {
				type: String,
				default: 'default'
			}
		},
		data() {
			return {
				text: {
					'default': '预约',
					'free': '空闲',
					'booked': '已预约'
				}
			}
		},
		methods: {
			onTap() {
				this.$emit('select')
			}
		}
	}
</script>

<style scoped lang="scss">
@import './book-btn.scss';
</style>
